import 'package:ai_data_capture/page/configfile/binding.dart';
import 'package:ai_data_capture/page/configfile/view.dart';
import 'package:ai_data_capture/page/edit_config/binding.dart';
import 'package:ai_data_capture/page/edit_config/view.dart';
import 'package:ai_data_capture/page/flow_list/binding.dart';
import 'package:ai_data_capture/page/flow_list/view.dart';
import 'package:ai_data_capture/page/main/binding.dart';
import 'package:ai_data_capture/page/main/view.dart';
import 'package:ai_data_capture/page/program_list/binding.dart';
import 'package:ai_data_capture/page/program_list/view.dart';
import 'package:ai_data_capture/page/tasklist/add_template/binding.dart';
import 'package:ai_data_capture/page/tasklist/add_template/view.dart';
import 'package:ai_data_capture/page/tasklist/binding.dart';
import 'package:ai_data_capture/page/tasklist/view.dart';
import 'package:ai_data_capture/req/network_service.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyloading/flutter_easyloading.dart';
import 'package:get/get.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
        popGesture: true,
        builder: EasyLoading.init(),
        debugShowCheckedModeBanner: false,
        initialBinding: BindingsBuilder(() {
          Get.put(NetworkService());
        }),
        getPages: [
          GetPage(
              name: RoutePath.main,
              page: () => const MainPage(),
              binding: MainBinding()),
          GetPage(
              name: RoutePath.configfile,
              page: () => const ConfigfilePage(),
              binding: ConfigfileBinding()),
          GetPage(
              name: RoutePath.editConfig,
              page: () => const EditConfigPage(),
              binding: EditConfigBinding()),
          GetPage(
              name: RoutePath.taskList,
              page: () => const TaskListPage(),
              binding: TaskListBinding()),
          GetPage(
              name: RoutePath.flowList,
              page: () => const FlowListPage(),
              binding: FlowListBinding()),
          GetPage(
              name: RoutePath.programList,
              page: () => const ProgramListPage(),
              binding: ProgramListBinding()),
          GetPage(
              name: RoutePath.addTemplate,
              page: () => const AddTemplatePage(),
              binding: AddTemplateBinding()),
        ],
        defaultTransition: Transition.cupertino,
        initialRoute: RoutePath.main,
        title: 'AI data capture',
        theme: ThemeData(
            colorScheme: ColorScheme.fromSeed(seedColor: Colors.blue)));
  }
}

class RoutePath {
  static var main = "/main";
  static var configfile = "/configfile";
  static var editConfig = "/editConfig";
  static var taskList = "/taskList";
  static var flowList = "/flowList";
  static var programList = "/programList";
  static var addTemplate = "/addTemplate";
}
